import { createRouter, createWebHistory } from 'vue-router';
import routes from './routes';

const router = createRouter({
  history: createWebHistory(import.meta.env.VITE_CONF_PUBLIC_PATH),
  routes,
});

router.beforeEach((to) => {
  const { path } = to;

  if (path === '/login') {
    // 清除缓存
  }
});

export default router;
